package net.skyaims.sqlmgr.domain;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.skife.jdbi.v2.StatementContext;
import org.skife.jdbi.v2.tweak.ResultSetMapper;

import lombok.Data;

/**
 * <p>
 * 
 * <br>
 * 2013年12月27日 下午2:41:36
 * </p>
 * 
 * @author <a href="mailto:wujianing@cyou-inc.com">wujianing</a>
 */
@Data
public class HostTable implements ResultSetMapper<HostTable> {

	private Integer seqid;

	private String uuid;

	private Integer hid;

	private Integer gid;

	private Integer nid;

	private String wanHost;

	private String intraHost;

	private Integer center;

	private Integer gslb;

	private Integer cluster;

	private Integer source;

	private Integer root;

	private Integer live;

	private Integer liveLevel;

	private Integer state;

	private String comment;

	@Override
	public HostTable map(int index, ResultSet r, StatementContext ctx) throws SQLException {
		HostTable host = new HostTable();
		host.setSeqid(r.getInt("seqid"));
		host.setHid(r.getInt("hid"));
		host.setUuid(r.getString("uuid"));
		return host;
	}
}
